@extends('layouts.app')
@section('title')@parent @endsection
@section('content')
    <div class="container">
        <div class="row">
            <div class="col-lg-9 col-md-9 topic-list">
                <div class="alert alert-info">
                    <strong>{{$msg}}</strong>
                </div>

            </div>
        </div>
    </div>


@endsection
@section('scripts')
    <script>
        function selectCommunity(){
            $('#select-community').modal('show');
        }
        new Vue({
            el:'#app',
            mounted() {

            },
            data() {
                return {
                    communities:[]
                }
            },
            methods:{
                selectCounty(){
                    var countyId = $('#county').find('option:selected').attr('data-id');
                    axios.post('{{route('communities.get_by_county_id')}}',{county_id:countyId}).then((response) => {
                        if (response.status) {
                            this.communities = response.data;
                        }
                    }).catch((error) => {

                    });
                }
            }
        });
    </script>
@endsection

